import requests

url = "http://www.renren.com/970999102/profile"
headers = {"User-Agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1"
           }

Cookie = "anonymid=jw976awg-kxilzy; depovince=JX; _r01_=1; JSESSIONID=abcyCc9uIGeDja8AgIdSw; ick_login=a45496d3-9873-4998-abf2-16aeaed8a0b6; _de=BF09EE3A28DED52E6B65F6A4705D973F1383380866D39FF5; t=cd4155f01e018fa0db994833c0b8e23b2; societyguester=cd4155f01e018fa0db994833c0b8e23b2; id=970999102; xnsid=fc75b713; ver=7.0; loginfrom=null; jebe_key=a1d6868a-5c10-46d5-9fbf-92b80d032461%7C7c09cc2571e7bd92f08684b687631898%7C1559132524797%7C1%7C1559132530969; wp_fold=0; jebecookies=a618806a-a010-4593-83bc-b90b0d95672a|||||"

cookie_dict ={i.split("=")[0]:i.split("=")[-1] for i in Cookie.split(";")}

print(cookie_dict)
# cookie_dict = {
#     "anonymid":"jw976awg-kxilzy",
#     "depovince":"JX; _r01_=1"
# }

response = requests.get(url, headers=headers, cookies=cookie_dict)

with open("renren1.html","w",encoding="utf-8") as f:
    f.write(response.content.decode())


